package cn.icanci.loopstack.plugin.dalgen.mojo;

import cn.icanci.loopstack.plugin.dalgen.process.MojoGoalConstants;
import cn.icanci.loopstack.plugin.dalgen.process.MojoGoalGeneratorProcessor;

import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.codehaus.plexus.components.interactivity.PrompterException;

/**
 * CRUD 生成
 * 
 * @author icanci
 * @since 1.0 Created in 2022/05/14 11:37
 */
@Mojo(name = MojoGoalConstants.CRUD)
public class CrudGeneratorMojo extends AbstractDalGenMojo {

    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        try {
            generator(MojoGoalGeneratorProcessor.CRUD);
        } catch (PrompterException e) {
            e.printStackTrace();
        }
    }
}
